<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
    <script src="https://cdn.bootcss.com/vue/2.4.2/vue.min.js"></script>
</head>

<style>
    .class1{
        background: #444;
        color:#eee;
    }
</style>

<body>
    <div id="app">
        <label for="r1">修改颜色</label>
        <input type="checkbox" v-model="class1" id="r1"/>
        <br/><br/>
        <div v-bind:class="{'class1':class1}">
            directiva v-bind:class
        </div>
        {{5+5}}<br/>
        {{ok?'YES':'NO'}}<br/>
        {{message.split('').reverse().join('')}<br/>
        <div v-bind:id="'list-'+id"></div>
    </div>
    <script>
        new Vue({
            el: '#app',
            data: {
                class1:true
            }
        })
    </script>
</body>

</html>